package com.micosco.taskremind.data;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
public interface TaskDAO {
    @Insert()
    void add(Task task);
    @Delete
    void remove(Task task);
    @Update
    void update(Task... task);
    @Query("select * from tasks where uID = :taskUID")
    List<Task> findByID(int taskUID);
    @Query(value = "select * from tasks where finished = 0")
    List<Task> findAllUnfinished();
    @Query(value = "select * from tasks")
    List<Task> findAll();
}
